package com.bbx.taxi.client.Util;

import android.graphics.Bitmap;
import android.view.View;

/** 
 * @Path com.bbx.taxi.client.Util.ViewBitmap.java
 * @Author 严旭文
 * @Date 2016-8-8 下午4:40:27
 * @Company 蓝海（福建）信息技术有限公司
 * @Description
 */
public class ViewBitmap {
	public static  Bitmap getViewBitmap(View addViewContent) {

	addViewContent.setDrawingCacheEnabled(true);

	addViewContent.measure(
	View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
	View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
	addViewContent.layout(0, 0,
	addViewContent.getMeasuredWidth(),
	addViewContent.getMeasuredHeight());

	addViewContent.buildDrawingCache();
	Bitmap cacheBitmap = addViewContent.getDrawingCache();
	Bitmap bitmap = Bitmap.createBitmap(cacheBitmap);

	return bitmap;
	}
}
